﻿using Microsoft.AspNetCore.Mvc;
using UnitTest.iRepository;
using UnitTest.Model;
using UnitTest.Repository;
using UnitTest.Service;

namespace UnitTestDemo.Controller;


[Route("api/[controller]")]
[ApiController]
public class ValueController: ControllerBase
{
    private readonly IStudentService _studentService;

    public ValueController(IStudentService studentService)
    {
        _studentService = studentService;
    }
   
    [HttpGet("{id}")]
    public async Task<ActionResult<string>> Get(int id)
    {
        return $"Para is {id}";
    }

    [HttpGet]
    public async Task<List<Student>> GetAllStudent()
    {
        var res = await _studentService.GetList();
        return res;
    }
    
}